﻿namespace Lanbt.Core.Entity.Dto
{
    public class PagesResultOutput<T> : ResultOutput<IList<T>>
    {
        public PagesResultOutput()
        {
        }

        public PagesResultOutput(int total, IList<T> result) : base(result)
        {
            Total = total;
        }

        /// <summary>
        /// 总条数
        /// </summary>
        public int Total { get; set; }

        public PagesResultOutput<T> ResultInput(int total, IList<T> result)
        {
            Total = total;
            Result = result;
            return this;
        }

        public PagesResultOutput<T> AddError(string errMsg)
        {
            ErrorMsg = errMsg;
            return this;
        }
    }
}
